#ifndef ADDPIECENETWORKEVENT_H_
#define ADDPIECENETWORKEVENT_H_

#include "NetworkEvent.h"
#include "Position.h"
#include "Color.h"

class AddPieceNetworkEvent : public NetworkEvent
{
public:
    struct Data
    {
        long pieceId;
        int x;
        int y;
        int colorR;
        int colorG;
        int colorB;
    };

    struct Message
    {
        Header header;
        Data data;
    };

    AddPieceNetworkEvent(long pieceId, const Position& position,Color color);
    AddPieceNetworkEvent(const Header& header, const Data& data);
    virtual ~AddPieceNetworkEvent();

    virtual void visitWell(Well* well) const;

    virtual void* getMessageBlob();
    virtual size_t getMessageBlobSize();

private:
    Message message;
};

#endif
